package com.xinchao.dao;

import com.xinchao.model.vo.DeviceUpgradeListVO;
import com.xinchao.model.DeviceUpgrade;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeviceUpgradeMapper {

	/**
	 * 保存终端升级
	 * @param deviceUpgrade TbDeviceUpgrade对象
	 */
	void saveDeviceUpgrade(DeviceUpgrade deviceUpgrade);

	/**
	 * 获取终端升级分页列表
	 * hanqr 2018-08-13
	 * @param upgradeType  升级类型(0:软件；1:固件)
	 * @return Page<TbDeviceUpgrade>
	 */
	Page<DeviceUpgradeListVO> listDeviceUpgradeByPage(@Param("upgradeType") Integer upgradeType);

	/**
	 * 通过ID获取终端升级
	 *
	 * @param deviceUpgradeId 终端升级ID
	 * @return TbDeviceUpgrade
	 */
	DeviceUpgrade getDeviceUpgradeById(@Param("deviceUpgradeId") Long deviceUpgradeId);

	/**
	 * 更新终端升级
	 *
	 * @param deviceUpgrade TbDeviceUpgrade
	 */
	void updateDeviceUpgrade(DeviceUpgrade deviceUpgrade);

	/**
	 * 根据id删除
	 * @param deviceUpgradeId
	 * @return
	 */
	int delById(@Param("deviceUpgradeId") Integer deviceUpgradeId);
}